def test(a, b):
    def test_in(x):
        print(a * x + b)

    return test_in


line_1 = test(1, 1)
line_1(0)  # 1

line_2 = test(10, 4)
line_2(0)  # 4

line_1(0)  # 1


def createNum(a, b, x):
    print(a * x + b)


a = 1
b = 1
x = 0

createNum(a, b, x)  # 1
createNum(a, b, x)  # 1
